package com.example.designprinciple.ocp;

/**
 * @Authors：gaoyang
 * @CreateTime：2021-10-18
 * @Description：单独扩展java课程的价格
 */
public class JavaDisCountCourse extends JavaCourse{

    public JavaDisCountCourse(Integer id, String name, Double price) {
        super(id, name, price);
    }

    public Double getOriginPrice(){
        return super.getPrice();
    }

    public Double getDisCountPrice(){
        return super.getPrice()*0.61;
    }
}
